home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
DATATYPE
/
ELEMENT2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-08-18
|
911b
|
25 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; polymorphic elements for abstract data types #2
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBDAT;
var Element1, Element2 : GenericLinkageObjectPointerType;
Data : string;
begin
Data := 'SOMETHING HERE';
New (Element1, Initialize (Data, SizeOf(Data)));
New (Element2, InitializeDuplicate (Element1));
{ Display the two elements }
Write ('"', String(Element1^.DataPointer(0)^), '" should be equal to "');
WriteLn (String(Element2^.DataPointer(0)^), '"');
Element1^.Free; Element2^.Free;
if GlobalDataError then WriteLn ('Error(s) reported!');
end.